From 5b6313f16f508882a0ea67716b7dbaa1c6967f04 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 30 Jun 2025 08:28:13 +0000 Subject: (대표님) 20250630 16시 - 유저 도메인별 라우터 분리와 보안성검토 대응 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engineering/(engineering)/evaluation/page.tsx | 181 +++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 app/[lng]/engineering/(engineering)/evaluation/page.tsx (limited to 'app/[lng]/engineering/(engineering)/evaluation/page.tsx') diff --git a/app/[lng]/engineering/(engineering)/evaluation/page.tsx b/app/[lng]/engineering/(engineering)/evaluation/page.tsx new file mode 100644 index 00000000..ead61077 --- /dev/null +++ b/app/[lng]/engineering/(engineering)/evaluation/page.tsx @@ -0,0 +1,181 @@ +// ================================================================ +// 4. PERIODIC EVALUATIONS PAGE +// ================================================================ + +import * as React from "react" +import { Metadata } from "next" +import { type SearchParams } from "@/types/table" +import { getValidFilters } from "@/lib/data-table" +import { Shell } from "@/components/shell" +import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton" +import { HelpCircle } from "lucide-react" +import { + Popover, + PopoverContent, + PopoverTrigger, +} from "@/components/ui/popover" +import { Button } from "@/components/ui/button" +import { Badge } from "@/components/ui/badge" +import { PeriodicEvaluationsTable } from "@/lib/evaluation/table/evaluation-table" +import { getPeriodicEvaluations } from "@/lib/evaluation/service" +import { searchParamsEvaluationsCache } from "@/lib/evaluation/validation" + +export const metadata: Metadata = { + title: "협력업체 정기평가", + description: "협력업체 정기평가 진행 현황을 관리합니다.", +} + +interface PeriodicEvaluationsPageProps { + searchParams: Promise +} + +// 프로세스 안내 팝오버 컴포넌트 +function ProcessGuidePopover() { + return ( + + + + + +
+
+

정기평가 프로세스

+

+ 확정된 평가 대상 업체들에 대한 정기평가 절차입니다. +

+
+
+
+
+ 1 +
+
+

평가 대상 확정

+

평가 대상으로 확정된 업체들의 정기평가가 자동 생성됩니다.

+
+
+
+
+ 2 +
+
+

업체 자료 제출

+

각 업체는 평가에 필요한 자료를 제출 마감일까지 제출해야 합니다.

+
+
+
+
+ 3 +
+
+

평가자 검토

+

지정된 평가자들이 평가표를 기반으로 점수를 매기고 검토합니다.

+
+
+
+
+ 4 +
+
+

최종 확정

+

모든 평가가 완료되면 최종 점수와 등급이 확정됩니다.

+
+
+
+
+
+
+ ) +} + +// TODO: 이 함수들은 실제 서비스 파일에서 구현해야 함 +function getDefaultEvaluationYear() { + return new Date().getFullYear() +} + + + +export default async function PeriodicEvaluationsPage(props: PeriodicEvaluationsPageProps) { + const searchParams = await props.searchParams + const search = searchParamsEvaluationsCache.parse(searchParams) + const validFilters = getValidFilters(search.filters || []) + + // 기본 필터 처리 + let basicFilters = [] + if (search.basicFilters && search.basicFilters.length > 0) { + basicFilters = search.basicFilters + } + + // 모든 필터를 합쳐서 처리 + const allFilters = [...validFilters, ...basicFilters] + + // 조인 연산자 + const joinOperator = search.basicJoinOperator || search.joinOperator || 'and'; + + // 현재 평가년도 + const currentEvaluationYear = search.evaluationYear || getDefaultEvaluationYear() + + // Promise.all로 감싸서 전달 + const promises = Promise.all([ + getPeriodicEvaluations({ + ...search, + filters: allFilters, + joinOperator, + }) + ]) + + return ( + + {/* 헤더 */} +
+
+
+

+ 협력업체 정기평가 +

+ + {currentEvaluationYear}년도 + +
+
+
+ + {/* 메인 테이블 */} + + } + > + + +
+ ) +} \ No newline at end of file -- cgit v1.2.3